package com.xbongbong.saas.model;

import com.xbongbong.paas.domain.entity.ext.PaasFormDataEntityExt;
import com.xbongbong.paas.pojo.SummaryDataPoJo;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.IModel;
import com.xbongbong.pro.domain.entity.LabelEntity;
import com.xbongbong.pro.label.pojo.LabelPojo;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @author guohui.zhang
 * @Title: 标签实现类
 * @date 2020/11/218:58
 */
public interface LabelModel extends IModel<LabelEntity> {
    @Override
    Integer insert(LabelEntity entity) throws XbbException;

    @Override
    Integer update(LabelEntity entity) throws XbbException;

    @Override
    List<LabelEntity> findEntitys(Map<String, Object> param);

    @Override
    Integer getEntitysCount(Map<String, Object> param);

    Integer save(LabelEntity entity) throws XbbException;

    LabelEntity getByKey(Long key, String corpid);

    Integer sortCategory(Map<String, Object> param, Map<Long, Long> sortMap);

    Integer deleteBykey(Long key, String corpid);

    List<LabelEntity> getByLabelIds (Collection<Long> ids, String corpid);

    List<LabelEntity> getByGroupId(Long gorpuId, String corpid);

    Integer updateBatch(List<LabelEntity>  labelEntities, String corpid);

    List<LabelEntity> getByName(String name,Long formId, String corpid);

    void insertBatch(List<LabelEntity> labelEntities, String corpid);

    void deleteBatch(List<Long> labelIds, String corpid);

    void deleteByFormIds(Collection<Long> systemFormList, String targetCorpid, Long appId);



    Map<Long, LabelPojo> dealLabel(Long formId, Long appId, String corpid, Collection labelsIdList);
}
